﻿@{
    ViewBag.Title = "跟踪记录管理";
}
@section headerSection{
    <link href="~/Resources/mainFrame/js/plugins/zTree3/css/metroStyle/zTreeStyle.css" rel="stylesheet" />
    <style>
        .float-unit {
            height: 100%;
            border-right: 1px solid #E7EAEC;
            margin-bottom: 0px;
        }

        .left-sm-3 {
            padding-left: 0px;
        }

        .right-sm-9 {
            padding-right: 0px;
        }

        .ibox-unit {
            overflow-y: auto;
            height: 89%;
            padding: 0px;
        }

        #exampleToolbar div {
            margin-bottom: 0px;
        }

        #exampleToolbar > .form-group {
            float: left;
            margin: 0;
            margin-right: 5px;
            margin-top: 1px;
        }

        .form-group > button {
            margin-top: -2px;
            margin-bottom: 2px;
        }

        .number-money {
            padding-top: 0;
            padding-bottom: 0;
        }
    </style>
}
<div class="wrapper animated fadeInRight autoHeight">
    <!-- Panel Other -->
    <div class="row autoHeight" style="background-color: #fff;">
        <!--区域 项目选择-->
        <div id="treeArea" class="col-sm-2 autoHeight left-sm-3" style="padding-right:0;">
            <div class="ibox float-e-margins float-unit" style="padding-bottom:100px;">
                <div class="ibox-title" style="border-width: 0;padding:3px 0px 7px;">
                    <input type="text" name="searchArea" id="searchArea" class="selUnit queryClass" placeholder="输入名称查询" />
                    <select id="seSheng" class="queryClass"></select>
                    <select id="seShi" class="queryClass"></select>
                </div>
                <div class="ibox-unit" style="height:100%;">
                    <div id="abc" class="test">
                        <div id="divtreeDetail" style="overflow-y:auto; overflow-x:hidden;">
                            <ul id="testTree" style="padding:0px;" class="ztree"></ul>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="col-sm-10 col-sm-leftRight" style="padding-left: 5px; margin-top: 2px;">
            <!-- Example Toolbar -->
            <div class="example">
                <div class="btn-group hidden-xs" id="exampleToolbar" role="group">
                    @{
                        List<string> folderList = (List<string>)ViewBag.elementList;
                        if (folderList.Contains("trackAdd"))
                        {
                            <button id="trackAdd" type="button" class="btn btn-outline btn-primary">
                                <i class="glyphicon glyphicon-plus" aria-hidden="true">添加</i>
                            </button>
                        }
                        if (folderList.Contains("trackEdit"))
                        {
                            <button id="trackEdit" type="button" class="btn btn-outline btn-primary">
                                <i class="glyphicon glyphicon-pencil" aria-hidden="true">编辑</i>
                            </button>
                        }
                        if (folderList.Contains("trackDel"))
                        {
                            <button id="trackDel" type="button" class="btn btn-outline btn-danger">
                                <i class="glyphicon glyphicon-trash" aria-hidden="true">删除</i>
                            </button>
                        }
                        if (folderList.Contains("btnSearch"))
                        {
                            <div class="form-group" style="margin-top:-2px;">
                                <select id="trackStatus" name="trackStatus" title="请选择跟踪状态" class="form-control show-tick selectpicker" data-live-search="true" placeholder="请选择跟踪状态">
                                    <option value="01">设备跟踪记录</option>
                                    <option value="02">业务跟踪记录</option>
                                </select>
                            </div>
                            <div class="form-group">
                                <input id="trackDate" name="trackDate" type="text" class="laydate-icon form-control input-sm" placeholder="请输入跟踪时间" title="请输入跟踪时间" required="" aria-required="true" onclick="laydate({istime: true, format: 'YYYY-MM-DD'})" />
                            </div>
                            <div class="form-group">
                                <button id="btnSearch" class="btn btn-primary" type="button"><i class="fa fa-search"></i>&nbsp;查询</button>
                            </div>
                        }
                    }
                </div>
                <table id="exampleTableToolbar" data-mobile-responsive="true" data-radio="true"></table>
            </div>
            <!-- End Example Toolbar -->
        </div>
    </div>
    <!-- End Panel Other -->
</div>
<!-- 添加/编辑 -->
<div id="org_form" style="width: 460px; overflow: hidden; display: none; padding-bottom:140px;">
    <form class="form-horizontal m-t" id="orgFormTable" method="post" style="padding-bottom:50px;">
        <div class="form-group">
            <label class="col-sm-3 control-label">跟踪状态<span class="glyphicon glyphicon-asterisk requiredtitle"></span>：</label>
            <div class="col-sm-7">
                <select id="tr_status" name="tr_status" title="请选择跟踪状态" class="form-control show-tick selectpicker" data-live-search="true" placeholder="请选择跟踪状态" required="" aria-required="true">
                    <option value="01" selected>设备跟踪记录</option>
                    <option value="02">业务跟踪记录</option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">设备编号：</label>
            <div class="col-sm-7">
                <select id="fa_number" name="fa_number" class="selectpicker show-tick form-control" data-placeholder="请选择设备编号" data-live-search="true"></select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">跟踪人：</label>
            <div class="col-sm-7">
                <select id="track_name" name="track_name" class="selectpicker show-tick form-control" data-placeholder="请选择跟踪人" data-live-search="true"></select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">跟踪时间<span class="glyphicon glyphicon-asterisk requiredtitle"></span>：</label>
            <div class="col-sm-7">
                <input id="track_date" name="track_date" type="text" class="laydate-icon form-control input-sm" placeholder="请输入跟踪时间" title="请输入跟踪时间" required="" aria-required="true" onclick="laydate({istime: true, format: 'YYYY-MM-DD'})" />
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">备注：</label>
            <div class="col-sm-7">
                <textarea class="form-control" id="tr_note" name="tr_note" rows="3" placeholder="请输入备注信息" title="请输入备注信息"></textarea>
                <input type="hidden" id="area_code" name="area_code" value="" />
                <input type="hidden" id="unit_name" name="unit_name" value="" />
                <input type="hidden" id="unit_code" name="unit_code" value="" />
            </div>
        </div>
    </form>
</div>
@Scripts.Render("~/bundles/z-tree")
@section footSection{
    <script src="~/Resources/mainFrame/js/plugins/treeview/v1.2.0/bootstrap-treeview.js"></script>
    <script src="~/Resources/tools/treeview-search-custom.js"></script>
    <script src="~/Resources/myScript/AfterSaleManager/trackRecordManager.js"></script>  
    <script src="~/Scripts/bootstrap-tree-help.js"></script>
    <script src="~/Scripts/url-help.js"></script>
    <script>
        $(function () {
            //初始化Page
            trackRecordManager.initPage();
        });
    </script>
}
